from django.forms import ModelForm

class BaseForm(ModelForm):
    exclude_bootstrap = []

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        for k, item in self.fields.items():
            if k in self.exclude_bootstrap:
                continue
            item.widget.attrs['class'] = 'form-control'